package com.yyplatform.frontend.platform.account.entity;

import java.util.Date;

import com.yyplatform.frontend.infra.entity.BaseEntity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

/**
 * Created on 2024-10-17
 */
@Entity
@Getter
@Setter
@Table(name = "yy_user_auth")
public class UserAuthEntity extends BaseEntity {

    @Column(name = "user_id", nullable = false, columnDefinition = " bigint(20) comment '用户ID_FK' ")
    private Long userId;


    @Column(name = "identifier", nullable = false, columnDefinition = " varchar(200) comment '登录唯一标识' ")
    private String identifier;


    @Column(name = "login_type", nullable = false, columnDefinition = " int(11) comment '登录类型' ")
    private Integer loginType;


    @Column(name = "password", columnDefinition = " varchar(200) comment '密码' ")
    private String password;


    @Column(name = "salt", columnDefinition = " varchar(50) comment '密码盐' ")
    private String salt;


    @Column(name = "last_login_time", nullable = false, columnDefinition = " DATETIME comment '最后登录时间' ")
    private Date lastLoginTime;


    @Column(name = "pwd_reset_time", nullable = false, columnDefinition = " DATETIME comment '密码修改时间' ")
    private Date pwdResetTime;


    @Column(name = "union_id", columnDefinition = " varchar(200) comment '第三方unionID' ")
    private String unionId;


    @Column(name = "open_id", columnDefinition = " varchar(200) comment '第三方openID' ")
    private String openId;


}
